<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGrUserCommentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('gr_user_comment', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('goods_id')->nullable()->comment('商品id');
            $table->tinyInteger('goods_grade')->nullable()->comment('商品评分');
            $table->string('comment_content')->nullable()->comment('评论内容');
            $table->tinyInteger('serve_grade')->nullable()->comment('服务评分');
            $table->string('comment_img')->nullable()->comment('评论图片');
            $table->timestamp('comment_time')->nullable()->comment('评论时间');
            $table->string('user_img')->nullable()->comment('用户头像');
            $table->string('user_name')->nullable()->comment('用户名称');
            $table->integer('user_id')->nullable()->comment('用户id');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('gr_user_comment');
    }
}
